package lab9.com.acme.bankapp.domain.bank;

public class Bank
{
	public static final String MAX_NUM = "The maximal number of clients is reached.";
	private Client[] clients;
	private int numberOfClients;
	private int maxNumberOfClients;
	
	public Bank(final int bankSize)
	{
		maxNumberOfClients = bankSize;
		clients = new Client[maxNumberOfClients];
	}
	
	public Client[] getClients()
	{
		return clients;
	}
	
	public void addClient(final Client newClient)
	{
		if (numberOfClients < maxNumberOfClients)
		{
			clients[numberOfClients] = newClient;
			numberOfClients++;
		}
		else
		{
			System.out.println(MAX_NUM);
		}
	}
	
	public int getNumberOfClients()
	{
		return numberOfClients;
	}
}
